program Project2;

{$APPTYPE CONSOLE}

uses
  SysUtils;

var
  fin: textFile;
  n,i: integer;
  x0, y0, s1, s2, a1,b1, a2,b2, a3,b3,x,y  :real;
begin
  assignFile(fin, 'input.txt');
  reset(fin);
  readln(fin, n);
  for i:=1 to n do
  begin
    readln(fin, x, y);
    x0:=x0+ x;
    y0:=y0+ y;
  end;
  x0:= x0/n;
  y0:= y0/n;

  readln(fin, n);
  readln(fin,a1,b1);
  readln(fin, a2,b2);
  for i:=1 to n-2 do
  begin
     readln(fin, a3,b3);
     s1:= s1+ (a1*b2-a2*b1 + a2*b3-a3*b2 + a3*b1-a1*b3)/2;
     a2:=a3;
     b2:=b3;
  end;

  readln(fin, n);
  a1:=x0;
  b1:=y0;
  readln(fin, a2, b2);
  for i:=1 to n-2 do
  begin
     readln(fin, a3,b3);
     s2:= s2+ (a1*b2-a2*b1 + a2*b3-a3*b2 + a3*b1-a1*b3);
     a2:=a3;
     b2:=b3;
  end;



  if s1=s2 then writeln('Yes') else writeln('No');
  closeFile(fin);
  readln;


end.
